package com.feihao.demoDate;

import java.math.BigDecimal;
import java.util.Objects;

public class TestObject {
    public static void main(String[] args) {
        Student s = new Student();
        boolean result = Objects.isNull(s);


        String string = Objects.toString(s, "6543");

        System.out.println(0.1+0.2);
        System.out.println(1.0+1.2);
        BigDecimal bigDecimal1 = new BigDecimal(1.0);
        BigDecimal bigDecimal2 = new BigDecimal(1.2);
        BigDecimal result2 = bigDecimal1.add(bigDecimal2);
        System.out.println(result2);
        System.out.println("构造传入字符串参数:");


        System.out.println(0.3+0.03);
        BigDecimal bigDecimal3 = new BigDecimal("0.002");
        BigDecimal bigDecimal4 = new BigDecimal("0.0033");
        System.out.println(bigDecimal3.add(bigDecimal4));



    }
}
